home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / dos / allocdosobject.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  81 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: allocdosobject.c,v 1.4 1996/10/24 15:50:23 aros Exp $
  4.     $Log: allocdosobject.c,v $
  5.     Revision 1.4  1996/10/24 15:50:23  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.3  1996/08/13 13:52:44  digulla
  9.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  10.     Replaced AROS_LA by AROS_LHA
  11.  
  12.     Revision 1.2  1996/08/01 17:40:47  digulla
  13.     Added standard header for all files
  14.  
  15.     Desc:
  16.     Lang: english
  17. */
  18. #include <exec/memory.h>
  19. #include <clib/exec_protos.h>
  20. #include <dos/exall.h>
  21. #include <utility/tagitem.h>
  22. #include "dos_intern.h"
  23.  
  24. /*****************************************************************************
  25.  
  26.     NAME */
  27.     #include <clib/dos_protos.h>
  28.  
  29.     AROS_LH2(APTR, AllocDosObject,
  30.  
  31. /*  SYNOPSIS */
  32.     AROS_LHA(ULONG,            type, D1),
  33.     AROS_LHA(struct TagItem *, tags, D2),
  34.  
  35. /*  LOCATION */
  36.     struct DosLibrary *, DOSBase, 38, Dos)
  37.  
  38. /*  FUNCTION
  39.     Creates a new dos object of a given type.
  40.  
  41.     INPUTS
  42.     type - object type.
  43.     tags - Pointer to taglist array with additional information.
  44.  
  45.     RESULT
  46.     Pointer to new object or NULL.
  47.  
  48.     NOTES
  49.  
  50.     EXAMPLE
  51.  
  52.     BUGS
  53.  
  54.     SEE ALSO
  55.  
  56.     INTERNALS
  57.  
  58.     HISTORY
  59.     29-10-95    digulla automatically created from
  60.                 dos_lib.fd and clib/dos_protos.h
  61.  
  62. *****************************************************************************/
  63. {
  64.     AROS_LIBFUNC_INIT
  65.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  66.  
  67.     switch(type)
  68.     {
  69.     case DOS_FILEHANDLE:
  70.         return AllocMem(sizeof(struct FileHandle),MEMF_CLEAR);
  71.     case DOS_FIB:
  72.         return AllocMem(sizeof(struct FileInfoBlock),MEMF_CLEAR);
  73.     case DOS_EXALLCONTROL:
  74.         return AllocMem(sizeof(struct ExAllControl),MEMF_CLEAR);
  75.     case DOS_CLI:
  76.         return AllocMem(sizeof(struct CommandLineInterface),MEMF_CLEAR);
  77.     }
  78.     return NULL;
  79.     AROS_LIBFUNC_EXIT
  80. } /* AllocDosObject */
  81.